﻿using System;
namespace Microsoft.Data.OData.Json
{
    /// <summary>
    /// Interface representing a context necessary for reading JSON operations values.
    /// </summary>
    internal interface IODataJsonOperationsDeserializerContext
    {
        /// <summary>
        /// The JSON reader to read the operations value from.
        /// </summary>
        JsonReader JsonReader
        {
            get;
        }
        /// <summary>
        /// Given a URI from the payload, this method will try to make it absolute, or fail otherwise.
        /// </summary>
        /// <param name="uriFromPayload">The URI string from the payload to process.</param>
        /// <returns>An absolute URI to report.</returns>
        Uri ProcessUriFromPayload(string uriFromPayload);
        /// <summary>
        /// Adds the specified action to the current entry.
        /// </summary>
        /// <param name="action">The action whcih is fully populated with the data from the payload.</param>
        void AddActionToEntry(ODataAction action);
        /// <summary>
        /// Adds the specified function to the current entry.
        /// </summary>
        /// <param name="function">The function whcih is fully populated with the data from the payload.</param>
        void AddFunctionToEntry(ODataFunction function);
    }
}
